home *** CD-ROM | disk | FTP | other *** search
- package symantec.itools.db.pro;
-
- import java.io.EOFException;
- import java.util.Vector;
- import symantec.itools.db.net.ClientSession;
- import symantec.itools.db.net.NetData;
- import symantec.itools.db.net.NetString;
- import symantec.itools.db.net.Param;
- import symantec.itools.db.net.RemoteObject;
- import symantec.itools.db.net.TextParam;
- import symjava.sql.SQLException;
-
- public class SessionMetaData {
- Session _session;
- RemoteObject _messgr;
- Vector _multiViews;
- ConnectionInfo _conn;
- private boolean _allProceduresAreCallable;
- private boolean _allTablesAreSelectable;
- private boolean _isReadOnly;
- private boolean _nullsAreSortedHigh;
- private boolean _nullsAreSortedLow;
- private boolean _nullsAreSortedAtStart;
- private boolean _nullsAreSortedAtEnd;
- private boolean _isCatalogAtStart;
- private boolean _usesLocalFiles;
- private boolean _usesLocalFilePerTable;
- private boolean _supportsMixedCaseIdentifiers;
- private boolean _storesUpperCaseIdentifiers;
- private boolean _storesLowerCaseIdentifiers;
- private boolean _storesMixedCaseIdentifiers;
- private boolean _supportsMixedCaseQuotedIdentifiers;
- private boolean _storesUpperCaseQuotedIdentifiers;
- private boolean _storesLowerCaseQuotedIdentifiers;
- private boolean _storesMixedCaseQuotedIdentifiers;
- private boolean _supportsAlterTableWithAddColumn;
- private boolean _supportsAlterTableWithDropColumn;
- private boolean _supportsTableCorrelationNames;
- private boolean _supportsDifferentTableCorrelationNames;
- private boolean _supportsColumnAliasing;
- private boolean _supportsNonNullableColumns;
- private boolean _nullPlusNonNullIsNull;
- private boolean _supportsExpressionsInOrderBy;
- private boolean _supportsOrderByUnrelated;
- private boolean _supportsGroupBy;
- private boolean _supportsGroupByUnrelated;
- private boolean _supportsGroupByBeyondSelect;
- private boolean _supportsOuterJoins;
- private boolean _supportsFullOuterJoins;
- private boolean _supportsLimitedOuterJoins;
- private boolean _supportsLikeEscapeClause;
- private boolean _supportsMultipleResultSets;
- private boolean _supportsMultipleTransactions;
- private boolean _supportsOpenCursorsAcrossCommit;
- private boolean _supportsOpenCursorsAcrossRollback;
- private boolean _supportsOpenStatementsAcrossCommit;
- private boolean _supportsOpenStatementsAcrossRollback;
- private boolean _supportsTransactions;
- private boolean _supportsDataDefinitionAndDataManipulationTransactions;
- private boolean _supportsDataManipulationTransactionsOnly;
- private boolean _supportsMinimumSQLGrammar;
- private boolean _supportsCoreSQLGrammar;
- private boolean _supportsExtendedSQLGrammar;
- private boolean _supportsIntegrityEnhancementFacility;
- private boolean _supportsSchemasInDataManipulation;
- private boolean _supportsSchemasInProcedureCalls;
- private boolean _supportsSchemasInTableDefinitions;
- private boolean _supportsSchemasInIndexDefinitions;
- private boolean _supportsSchemasInPrivilegeDefinitions;
- private boolean _supportsCatalogsInDataManipulation;
- private boolean _supportsCatalogsInProcedureCalls;
- private boolean _supportsCatalogsInTableDefinitions;
- private boolean _supportsCatalogsInIndexDefinitions;
- private boolean _supportsCatalogsInPrivilegeDefinitions;
- private boolean _supportsPositionedDelete;
- private boolean _supportsPositionedUpdate;
- private boolean _supportsSelectForUpdate;
- private boolean _supportsSubqueriesInComparisons;
- private boolean _supportsSubqueriesInExists;
- private boolean _supportsSubqueriesInIns;
- private boolean _supportsSubqueriesInQuantifieds;
- private boolean _supportsCorrelatedSubqueries;
- private boolean _supportsUnion;
- private boolean _supportsUnionAll;
- private boolean _doesMaxRowSizeIncludeBlobs;
- private boolean _supportsStoredProcedures;
- private boolean _dataDefinitionCausesTransactionCommit;
- private boolean _dataDefinitionIgnoredInTransactions;
- private boolean _supportsANSI92EntryLevelSQL;
- private boolean _supportsANSI92IntermediateSQL;
- private boolean _supportsANSI92FullSQL;
- private int _MaxBinaryLiteralLength;
- private int _MaxCharLiteralLength;
- private int _MaxColumnNameLength;
- private int _MaxColumnsInGroupBy;
- private int _MaxColumnsInIndex;
- private int _MaxColumnsInOrderBy;
- private int _MaxColumnsInSelect;
- private int _MaxColumnsInTable;
- private int _MaxConnections;
- private int _MaxCursorNameLength;
- private int _MaxIndexLength;
- private int _MaxSchemaNameLength;
- private int _MaxProcedureNameLength;
- private int _MaxCatalogNameLength;
- private int _MaxRowSize;
- private int _MaxStatementLength;
- private int _MaxStatements;
- private int _MaxTableNameLength;
- private int _MaxTablesInSelect;
- private int _MaxUserNameLength;
- private int _DefaultTransactionIsolation;
- private String _UserName;
- private String _DatabaseProductName;
- private String _DatabaseProductVersion;
- private String _SchemaTerm;
- private String _ProcedureTerm;
- private String _CatalogTerm;
- private String _CatalogSeparator;
- private String _SearchStringEscape;
- private String _ExtraNameCharacters;
- private String _IdentifierQuoteString;
- private String _DriverName;
- private String _DriverVersion;
- private final int METHOD_getURL;
- private final int METHOD_getDriverMajorVersion = 1;
- private final int METHOD_getDriverMinorVersion = 2;
- private final int METHOD_getSQLKeywords = 3;
- private final int METHOD_getNumericFunctions = 4;
- private final int METHOD_getStringFunctions = 5;
- private final int METHOD_getSystemFunctions = 6;
- private final int METHOD_supportsConvert1 = 7;
- private final int METHOD_supportsConvert2 = 8;
- private final int METHOD_supportsTransactionIsolationLevel = 9;
- private final int METHOD_getProcedures = 10;
- private final int METHOD_getProcedureColumns = 11;
- private final int METHOD_getTables = 12;
- private final int METHOD_getSchemas = 13;
- private final int METHOD_getCatalogs = 14;
- private final int METHOD_getTableTypes = 15;
- private final int METHOD_getColumns = 16;
- private final int METHOD_getColumnPrivileges = 17;
- private final int METHOD_getTablePrivileges = 18;
- private final int METHOD_getBestRowIdentifier = 19;
- private final int METHOD_getVersionColumns = 20;
- private final int METHOD_getPrimaryKeys = 21;
- private final int METHOD_getImportedKeys = 22;
- private final int METHOD_getExportedKeys = 23;
- private final int METHOD_getCrossReference = 24;
- private final int METHOD_getTypeInfo = 25;
- private final int METHOD_getIndexInfo = 26;
- private final int METHOD_getTimeDateFunctions = 27;
- int procedureResultUnknown;
- int procedureNoResult = 1;
- int procedureReturnsResult = 2;
- int procedureColumnUnknown;
- int procedureColumnIn = 1;
- int procedureColumnInOut = 2;
- int procedureColumnResult = 3;
- int procedureColumnOut = 4;
- int procedureColumnReturn = 5;
- int bestRowTemporary;
- int bestRowTransaction = 1;
- int bestRowSession = 2;
- int bestRowUnknown;
- int bestRowNotPseudo = 1;
- int bestRowPseudo = 2;
- int versionColumnUnknown;
- int versionColumnNotPseudo = 1;
- int versionColumnPseudo = 2;
- int importedKeyCascade;
- int importedKeyRestrict = 1;
- int importedKeySetNull = 2;
- int typeUnSearchable;
- int typeSearchLikeOnly = 1;
- int typeSearchNotLike = 2;
- int typeSearchable = 3;
- short tableIndexStatistic;
- short tableIndexClustered = 1;
- short tableIndexHashed = 2;
- short tableIndexOther = 3;
-
- private ClientSession getSession() {
- return this._session.getClientSession();
- }
-
- SessionMetaData(Session session, Vector results, ConnectionInfo conn) throws SQLException {
- this._session = session;
- this._conn = conn;
- int id = 0;
- NetData d = (NetData)results.elementAt(0);
-
- try {
- id = d.getInt();
- } catch (EOFException e) {
- throw new SQLException(((Throwable)e).getMessage());
- }
-
- this._messgr = new RemoteObject("CSCLDatabaseMetaData", id, this._session.getClientSession());
- this._multiViews = new Vector();
-
- try {
- d = (NetData)results.elementAt(1);
- this._allProceduresAreCallable = d.getBool();
- d = (NetData)results.elementAt(2);
- this._allTablesAreSelectable = d.getBool();
- d = (NetData)results.elementAt(3);
- this._isReadOnly = d.getBool();
- d = (NetData)results.elementAt(4);
- this._nullsAreSortedHigh = d.getBool();
- d = (NetData)results.elementAt(5);
- this._nullsAreSortedLow = d.getBool();
- d = (NetData)results.elementAt(6);
- this._nullsAreSortedAtStart = d.getBool();
- d = (NetData)results.elementAt(7);
- this._nullsAreSortedAtEnd = d.getBool();
- d = (NetData)results.elementAt(8);
- this._isCatalogAtStart = d.getBool();
- d = (NetData)results.elementAt(9);
- this._usesLocalFiles = d.getBool();
- d = (NetData)results.elementAt(10);
- this._usesLocalFilePerTable = d.getBool();
- d = (NetData)results.elementAt(11);
- this._supportsMixedCaseIdentifiers = d.getBool();
- d = (NetData)results.elementAt(12);
- this._storesUpperCaseIdentifiers = d.getBool();
- d = (NetData)results.elementAt(13);
- this._storesLowerCaseIdentifiers = d.getBool();
- d = (NetData)results.elementAt(14);
- this._storesMixedCaseIdentifiers = d.getBool();
- d = (NetData)results.elementAt(15);
- this._supportsMixedCaseQuotedIdentifiers = d.getBool();
- d = (NetData)results.elementAt(16);
- this._storesUpperCaseQuotedIdentifiers = d.getBool();
- d = (NetData)results.elementAt(17);
- this._storesLowerCaseQuotedIdentifiers = d.getBool();
- d = (NetData)results.elementAt(18);
- this._storesMixedCaseQuotedIdentifiers = d.getBool();
- d = (NetData)results.elementAt(19);
- this._supportsAlterTableWithAddColumn = d.getBool();
- d = (NetData)results.elementAt(20);
- this._supportsAlterTableWithDropColumn = d.getBool();
- d = (NetData)results.elementAt(21);
- this._supportsTableCorrelationNames = d.getBool();
- d = (NetData)results.elementAt(22);
- this._supportsDifferentTableCorrelationNames = d.getBool();
- d = (NetData)results.elementAt(23);
- this._supportsColumnAliasing = d.getBool();
- d = (NetData)results.elementAt(24);
- this._supportsNonNullableColumns = d.getBool();
- d = (NetData)results.elementAt(25);
- this._nullPlusNonNullIsNull = d.getBool();
- d = (NetData)results.elementAt(26);
- this._supportsExpressionsInOrderBy = d.getBool();
- d = (NetData)results.elementAt(27);
- this._supportsOrderByUnrelated = d.getBool();
- d = (NetData)results.elementAt(28);
- this._supportsGroupBy = d.getBool();
- d = (NetData)results.elementAt(29);
- this._supportsGroupByUnrelated = d.getBool();
- d = (NetData)results.elementAt(30);
- this._supportsGroupByBeyondSelect = d.getBool();
- d = (NetData)results.elementAt(31);
- this._supportsOuterJoins = d.getBool();
- d = (NetData)results.elementAt(32);
- this._supportsFullOuterJoins = d.getBool();
- d = (NetData)results.elementAt(33);
- this._supportsLimitedOuterJoins = d.getBool();
- d = (NetData)results.elementAt(34);
- this._supportsLikeEscapeClause = d.getBool();
- d = (NetData)results.elementAt(35);
- this._supportsMultipleResultSets = d.getBool();
- d = (NetData)results.elementAt(36);
- this._supportsMultipleTransactions = d.getBool();
- d = (NetData)results.elementAt(37);
- this._supportsOpenCursorsAcrossCommit = d.getBool();
- d = (NetData)results.elementAt(38);
- this._supportsOpenCursorsAcrossRollback = d.getBool();
- d = (NetData)results.elementAt(39);
- this._supportsOpenStatementsAcrossCommit = d.getBool();
- d = (NetData)results.elementAt(40);
- this._supportsOpenStatementsAcrossRollback = d.getBool();
- d = (NetData)results.elementAt(41);
- this._supportsTransactions = d.getBool();
- d = (NetData)results.elementAt(42);
- this._supportsDataDefinitionAndDataManipulationTransactions = d.getBool();
- d = (NetData)results.elementAt(43);
- this._supportsDataManipulationTransactionsOnly = d.getBool();
- d = (NetData)results.elementAt(44);
- this._supportsMinimumSQLGrammar = d.getBool();
- d = (NetData)results.elementAt(45);
- this._supportsCoreSQLGrammar = d.getBool();
- d = (NetData)results.elementAt(46);
- this._supportsExtendedSQLGrammar = d.getBool();
- d = (NetData)results.elementAt(47);
- this._supportsIntegrityEnhancementFacility = d.getBool();
- d = (NetData)results.elementAt(48);
- this._supportsSchemasInDataManipulation = d.getBool();
- d = (NetData)results.elementAt(49);
- this._supportsSchemasInProcedureCalls = d.getBool();
- d = (NetData)results.elementAt(50);
- this._supportsSchemasInTableDefinitions = d.getBool();
- d = (NetData)results.elementAt(51);
- this._supportsSchemasInIndexDefinitions = d.getBool();
- d = (NetData)results.elementAt(52);
- this._supportsSchemasInPrivilegeDefinitions = d.getBool();
- d = (NetData)results.elementAt(53);
- this._supportsCatalogsInDataManipulation = d.getBool();
- d = (NetData)results.elementAt(54);
- this._supportsCatalogsInProcedureCalls = d.getBool();
- d = (NetData)results.elementAt(55);
- this._supportsCatalogsInTableDefinitions = d.getBool();
- d = (NetData)results.elementAt(56);
- this._supportsCatalogsInIndexDefinitions = d.getBool();
- d = (NetData)results.elementAt(57);
- this._supportsCatalogsInPrivilegeDefinitions = d.getBool();
- d = (NetData)results.elementAt(58);
- this._supportsPositionedDelete = d.getBool();
- d = (NetData)results.elementAt(59);
- this._supportsPositionedUpdate = d.getBool();
- d = (NetData)results.elementAt(60);
- this._supportsSelectForUpdate = d.getBool();
- d = (NetData)results.elementAt(61);
- this._supportsSubqueriesInComparisons = d.getBool();
- d = (NetData)results.elementAt(62);
- this._supportsSubqueriesInExists = d.getBool();
- d = (NetData)results.elementAt(63);
- this._supportsSubqueriesInIns = d.getBool();
- d = (NetData)results.elementAt(64);
- this._supportsSubqueriesInQuantifieds = d.getBool();
- d = (NetData)results.elementAt(65);
- this._supportsCorrelatedSubqueries = d.getBool();
- d = (NetData)results.elementAt(66);
- this._supportsUnion = d.getBool();
- d = (NetData)results.elementAt(67);
- this._supportsUnionAll = d.getBool();
- d = (NetData)results.elementAt(68);
- this._doesMaxRowSizeIncludeBlobs = d.getBool();
- d = (NetData)results.elementAt(69);
- this._supportsStoredProcedures = d.getBool();
- d = (NetData)results.elementAt(70);
- this._dataDefinitionCausesTransactionCommit = d.getBool();
- d = (NetData)results.elementAt(71);
- this._dataDefinitionIgnoredInTransactions = d.getBool();
- d = (NetData)results.elementAt(72);
- this._supportsANSI92EntryLevelSQL = d.getBool();
- d = (NetData)results.elementAt(73);
- this._supportsANSI92IntermediateSQL = d.getBool();
- d = (NetData)results.elementAt(74);
- this._supportsANSI92FullSQL = d.getBool();
- d = (NetData)results.elementAt(75);
- this._MaxBinaryLiteralLength = d.getInt();
- d = (NetData)results.elementAt(76);
- this._MaxCharLiteralLength = d.getInt();
- d = (NetData)results.elementAt(77);
- this._MaxColumnNameLength = d.getInt();
- d = (NetData)results.elementAt(78);
- this._MaxColumnsInGroupBy = d.getInt();
- d = (NetData)results.elementAt(79);
- this._MaxColumnsInIndex = d.getInt();
- d = (NetData)results.elementAt(80);
- this._MaxColumnsInOrderBy = d.getInt();
- d = (NetData)results.elementAt(81);
- this._MaxColumnsInSelect = d.getInt();
- d = (NetData)results.elementAt(82);
- this._MaxColumnsInTable = d.getInt();
- d = (NetData)results.elementAt(83);
- this._MaxConnections = d.getInt();
- d = (NetData)results.elementAt(84);
- this._MaxCursorNameLength = d.getInt();
- d = (NetData)results.elementAt(85);
- this._MaxIndexLength = d.getInt();
- d = (NetData)results.elementAt(86);
- this._MaxSchemaNameLength = d.getInt();
- d = (NetData)results.elementAt(87);
- this._MaxProcedureNameLength = d.getInt();
- d = (NetData)results.elementAt(88);
- this._MaxCatalogNameLength = d.getInt();
- d = (NetData)results.elementAt(89);
- this._MaxRowSize = d.getInt();
- d = (NetData)results.elementAt(90);
- this._MaxStatementLength = d.getInt();
- d = (NetData)results.elementAt(91);
- this._MaxStatements = d.getInt();
- d = (NetData)results.elementAt(92);
- this._MaxTableNameLength = d.getInt();
- d = (NetData)results.elementAt(93);
- this._MaxTablesInSelect = d.getInt();
- d = (NetData)results.elementAt(94);
- this._MaxUserNameLength = d.getInt();
- d = (NetData)results.elementAt(95);
- this._DefaultTransactionIsolation = d.getInt();
- NetString s = (NetString)results.elementAt(96);
- this._UserName = s.getString();
- s = (NetString)results.elementAt(97);
- this._DatabaseProductName = s.getString();
- s = (NetString)results.elementAt(98);
- this._DatabaseProductVersion = s.getString();
- s = (NetString)results.elementAt(99);
- this._SchemaTerm = s.getString();
- s = (NetString)results.elementAt(100);
- this._ProcedureTerm = s.getString();
- s = (NetString)results.elementAt(101);
- this._CatalogTerm = s.getString();
- s = (NetString)results.elementAt(102);
- this._CatalogSeparator = s.getString();
- s = (NetString)results.elementAt(103);
- this._SearchStringEscape = s.getString();
- s = (NetString)results.elementAt(104);
- this._ExtraNameCharacters = s.getString();
- s = (NetString)results.elementAt(105);
- this._IdentifierQuoteString = s.getString();
- s = (NetString)results.elementAt(106);
- this._DriverName = s.getString();
- s = (NetString)results.elementAt(107);
- this._DriverVersion = s.getString();
- } catch (EOFException e) {
- throw new SQLException(((Throwable)e).getMessage());
- }
- }
-
- public boolean allProceduresAreCallable() {
- return this._allProceduresAreCallable;
- }
-
- public boolean allTablesAreSelectable() {
- return this._allTablesAreSelectable;
- }
-
- public String getURL() throws SQLException {
- return this._session.getServerURL() + "/" + this._conn.getDBString();
- }
-
- public String getUserName() {
- return this._UserName;
- }
-
- public boolean isReadOnly() {
- return this._isReadOnly;
- }
-
- public boolean nullsAreSortedHigh() {
- return this._nullsAreSortedHigh;
- }
-
- public boolean nullsAreSortedLow() {
- return this._nullsAreSortedLow;
- }
-
- public boolean nullsAreSortedAtStart() {
- return this._nullsAreSortedAtStart;
- }
-
- public boolean nullsAreSortedAtEnd() {
- return this._nullsAreSortedAtEnd;
- }
-
- public String getDatabaseProductName() {
- return this._DatabaseProductName;
- }
-
- public String getDatabaseProductVersion() {
- return this._DatabaseProductVersion;
- }
-
- public String getDriverName() {
- return this._DriverName;
- }
-
- public String getDriverVersion() {
- return this._DriverVersion;
- }
-
- public int getDriverMajorVersion() {
- return 1;
- }
-
- public int getDriverMinorVersion() {
- return 0;
- }
-
- public boolean isCatalogAtStart() {
- return this._isCatalogAtStart;
- }
-
- public boolean usesLocalFiles() {
- return this._usesLocalFiles;
- }
-
- public boolean usesLocalFilePerTable() {
- return this._usesLocalFilePerTable;
- }
-
- public boolean supportsMixedCaseIdentifiers() {
- return this._supportsMixedCaseIdentifiers;
- }
-
- public boolean storesUpperCaseIdentifiers() {
- return this._storesUpperCaseIdentifiers;
- }
-
- public boolean storesLowerCaseIdentifiers() {
- return this._storesLowerCaseIdentifiers;
- }
-
- public boolean storesMixedCaseIdentifiers() {
- return this._storesMixedCaseIdentifiers;
- }
-
- public boolean supportsMixedCaseQuotedIdentifiers() {
- return this._supportsMixedCaseQuotedIdentifiers;
- }
-
- public boolean storesUpperCaseQuotedIdentifiers() {
- return this._storesUpperCaseQuotedIdentifiers;
- }
-
- public boolean storesLowerCaseQuotedIdentifiers() {
- return this._storesLowerCaseQuotedIdentifiers;
- }
-
- public boolean storesMixedCaseQuotedIdentifiers() {
- return this._storesMixedCaseQuotedIdentifiers;
- }
-
- public String getIdentifierQuoteString() {
- return this._IdentifierQuoteString;
- }
-
- public boolean supportsANSI92EntryLevelSQL() {
- return this._supportsANSI92EntryLevelSQL;
- }
-
- public boolean supportsANSI92IntermediateSQL() {
- return this._supportsANSI92IntermediateSQL;
- }
-
- public boolean supportsANSI92FullSQL() {
- return this._supportsANSI92FullSQL;
- }
-
- public String getSQLKeywords() throws SQLException {
- Vector results = this._messgr.invokeMethod(3);
- NetString s = (NetString)results.elementAt(0);
- return s.getString();
- }
-
- public String getTimeDateFunctions() throws SQLException {
- Vector results = this._messgr.invokeMethod(27);
- NetString s = (NetString)results.elementAt(0);
- return s.getString();
- }
-
- public String getNumericFunctions() throws SQLException {
- Vector results = this._messgr.invokeMethod(4);
- NetString s = (NetString)results.elementAt(0);
- return s.getString();
- }
-
- public String getStringFunctions() throws SQLException {
- Vector results = this._messgr.invokeMethod(5);
- NetString s = (NetString)results.elementAt(0);
- return s.getString();
- }
-
- public String getSystemFunctions() throws SQLException {
- Vector results = this._messgr.invokeMethod(6);
- NetString s = (NetString)results.elementAt(0);
- return s.getString();
- }
-
- public String getSearchStringEscape() {
- return this._SearchStringEscape;
- }
-
- public String getExtraNameCharacters() {
- return this._ExtraNameCharacters;
- }
-
- public boolean supportsAlterTableWithAddColumn() {
- return this._supportsAlterTableWithAddColumn;
- }
-
- public boolean supportsAlterTableWithDropColumn() {
- return this._supportsAlterTableWithDropColumn;
- }
-
- public boolean supportsTableCorrelationNames() {
- return this._supportsTableCorrelationNames;
- }
-
- public boolean supportsDifferentTableCorrelationNames() {
- return this._supportsDifferentTableCorrelationNames;
- }
-
- public boolean supportsColumnAliasing() {
- return this._supportsColumnAliasing;
- }
-
- public boolean supportsNonNullableColumns() {
- return this._supportsNonNullableColumns;
- }
-
- public boolean nullPlusNonNullIsNull() {
- return this._nullPlusNonNullIsNull;
- }
-
- public boolean supportsConvert() throws SQLException {
- Vector results = this._messgr.invokeMethod(7);
- NetData d = (NetData)results.elementAt(0);
-
- try {
- return d.getBool();
- } catch (EOFException e) {
- throw new SQLException(((Throwable)e).getMessage());
- }
- }
-
- public boolean supportsConvert(int fromType, int toType) throws SQLException {
- Vector params = new Vector();
- params.addElement(new Param(0, fromType));
- params.addElement(new Param(0, toType));
- Vector results = this._messgr.invokeMethod(8, params);
- NetData d = (NetData)results.elementAt(0);
-
- try {
- return d.getBool();
- } catch (EOFException e) {
- throw new SQLException(((Throwable)e).getMessage());
- }
- }
-
- public boolean supportsExpressionsInOrderBy() {
- return this._supportsExpressionsInOrderBy;
- }
-
- public boolean supportsOrderByUnrelated() {
- return this._supportsOrderByUnrelated;
- }
-
- public boolean supportsGroupBy() {
- return this._supportsGroupBy;
- }
-
- public boolean supportsGroupByUnrelated() {
- return this._supportsGroupByUnrelated;
- }
-
- public boolean supportsGroupByBeyondSelect() {
- return this._supportsGroupByBeyondSelect;
- }
-
- public boolean supportsOuterJoins() {
- return this._supportsOuterJoins;
- }
-
- public boolean supportsFullOuterJoins() {
- return this._supportsFullOuterJoins;
- }
-
- public boolean supportsLimitedOuterJoins() {
- return this._supportsLimitedOuterJoins;
- }
-
- public boolean supportsLikeEscapeClause() {
- return this._supportsLikeEscapeClause;
- }
-
- public boolean supportsMultipleResultSets() {
- return this._supportsMultipleResultSets;
- }
-
- public boolean supportsMultipleTransactions() {
- return this._supportsMultipleTransactions;
- }
-
- public boolean supportsOpenCursorsAcrossCommit() {
- return this._supportsOpenCursorsAcrossCommit;
- }
-
- public boolean supportsOpenCursorsAcrossRollback() {
- return this._supportsOpenCursorsAcrossRollback;
- }
-
- public boolean supportsOpenStatementsAcrossCommit() {
- return this._supportsOpenStatementsAcrossCommit;
- }
-
- public boolean supportsOpenStatementsAcrossRollback() {
- return this._supportsOpenStatementsAcrossRollback;
- }
-
- public boolean supportsTransactions() {
- return this._supportsTransactions;
- }
-
- public boolean supportsDataDefinitionAndDataManipulationTransactions() {
- return this._supportsDataDefinitionAndDataManipulationTransactions;
- }
-
- public boolean supportsDataManipulationTransactionsOnly() {
- return this._supportsDataManipulationTransactionsOnly;
- }
-
- public boolean supportsMinimumSQLGrammar() {
- return this._supportsMinimumSQLGrammar;
- }
-
- public boolean supportsCoreSQLGrammar() {
- return this._supportsCoreSQLGrammar;
- }
-
- public boolean supportsExtendedSQLGrammar() {
- return this._supportsExtendedSQLGrammar;
- }
-
- public boolean supportsIntegrityEnhancementFacility() {
- return this._supportsIntegrityEnhancementFacility;
- }
-
- public String getSchemaTerm() {
- return this._SchemaTerm;
- }
-
- public String getProcedureTerm() {
- return this._ProcedureTerm;
- }
-
- public String getCatalogTerm() {
- return this._CatalogTerm;
- }
-
- public String getCatalogSeparator() {
- return this._CatalogSeparator;
- }
-
- public boolean supportsSchemasInDataManipulation() {
- return this._supportsSchemasInDataManipulation;
- }
-
- public boolean supportsSchemasInProcedureCalls() {
- return this._supportsSchemasInProcedureCalls;
- }
-
- public boolean supportsSchemasInTableDefinitions() {
- return this._supportsSchemasInTableDefinitions;
- }
-
- public boolean supportsSchemasInIndexDefinitions() {
- return this._supportsSchemasInIndexDefinitions;
- }
-
- public boolean supportsSchemasInPrivilegeDefinitions() {
- return this._supportsSchemasInPrivilegeDefinitions;
- }
-
- public boolean supportsCatalogsInDataManipulation() {
- return this._supportsCatalogsInDataManipulation;
- }
-
- public boolean supportsCatalogsInProcedureCalls() {
- return this._supportsCatalogsInProcedureCalls;
- }
-
- public boolean supportsCatalogsInTableDefinitions() {
- return this._supportsCatalogsInTableDefinitions;
- }
-
- public boolean supportsCatalogsInIndexDefinitions() {
- return this._supportsCatalogsInIndexDefinitions;
- }
-
- public boolean supportsCatalogsInPrivilegeDefinitions() {
- return this._supportsCatalogsInPrivilegeDefinitions;
- }
-
- public boolean supportsPositionedDelete() {
- return this._supportsPositionedDelete;
- }
-
- public boolean supportsPositionedUpdate() {
- return this._supportsPositionedUpdate;
- }
-
- public boolean supportsSelectForUpdate() {
- return this._supportsSelectForUpdate;
- }
-
- public boolean supportsSubqueriesInComparisons() {
- return this._supportsSubqueriesInComparisons;
- }
-
- public boolean supportsSubqueriesInExists() {
- return this._supportsSubqueriesInExists;
- }
-
- public boolean supportsSubqueriesInIns() {
- return this._supportsSubqueriesInIns;
- }
-
- public boolean supportsSubqueriesInQuantifieds() {
- return this._supportsSubqueriesInQuantifieds;
- }
-
- public boolean supportsCorrelatedSubqueries() {
- return this._supportsCorrelatedSubqueries;
- }
-
- public boolean supportsUnion() {
- return this._supportsUnion;
- }
-
- public boolean supportsUnionAll() {
- return this._supportsUnionAll;
- }
-
- public boolean doesMaxRowSizeIncludeBlobs() {
- return this._doesMaxRowSizeIncludeBlobs;
- }
-
- public boolean supportsStoredProcedures() {
- return this._supportsStoredProcedures;
- }
-
- public int getMaxBinaryLiteralLength() {
- return this._MaxBinaryLiteralLength;
- }
-
- public int getMaxCharLiteralLength() {
- return this._MaxCharLiteralLength;
- }
-
- public int getMaxColumnNameLength() {
- return this._MaxColumnNameLength;
- }
-
- public int getMaxColumnsInGroupBy() {
- return this._MaxColumnsInGroupBy;
- }
-
- public int getMaxColumnsInIndex() {
- return this._MaxColumnsInIndex;
- }
-
- public int getMaxColumnsInOrderBy() {
- return this._MaxColumnsInOrderBy;
- }
-
- public int getMaxColumnsInSelect() {
- return this._MaxColumnsInSelect;
- }
-
- public int getMaxColumnsInTable() {
- return this._MaxColumnsInTable;
- }
-
- public int getMaxConnections() {
- return this._MaxConnections;
- }
-
- public int getMaxCursorNameLength() {
- return this._MaxCursorNameLength;
- }
-
- public int getMaxIndexLength() {
- return this._MaxIndexLength;
- }
-
- public int getMaxSchemaNameLength() {
- return this._MaxSchemaNameLength;
- }
-
- public int getMaxProcedureNameLength() {
- return this._MaxProcedureNameLength;
- }
-
- public int getMaxCatalogNameLength() {
- return this._MaxCatalogNameLength;
- }
-
- public int getMaxRowSize() {
- return this._MaxRowSize;
- }
-
- public int getMaxStatementLength() {
- return this._MaxStatementLength;
- }
-
- public int getMaxStatements() {
- return this._MaxStatements;
- }
-
- public int getMaxTableNameLength() {
- return this._MaxTableNameLength;
- }
-
- public int getMaxTablesInSelect() {
- return this._MaxTablesInSelect;
- }
-
- public int getMaxUserNameLength() {
- return this._MaxUserNameLength;
- }
-
- public int getDefaultTransactionIsolation() {
- return this._DefaultTransactionIsolation;
- }
-
- public boolean supportsTransactionIsolationLevel(int level) throws SQLException {
- Vector results = this._messgr.invokeMethod(9, level);
- NetData d = (NetData)results.elementAt(0);
-
- try {
- return d.getBool();
- } catch (EOFException e) {
- throw new SQLException(((Throwable)e).getMessage());
- }
- }
-
- public boolean dataDefinitionCausesTransactionCommit() {
- return this._dataDefinitionCausesTransactionCommit;
- }
-
- public boolean dataDefinitionIgnoredInTransactions() {
- return this._dataDefinitionIgnoredInTransactions;
- }
-
- public RelationView getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException {
- String catalogParam = "";
- String catalogTerm = this.getCatalogTerm();
- if (catalogTerm != "") {
- catalogParam = catalog;
- }
-
- String schemaParam = "";
- String schemaTerm = this.getSchemaTerm();
- if (schemaTerm != "") {
- schemaParam = schemaPattern;
- }
-
- Vector params = new Vector();
- params.addElement(new TextParam(0, catalogParam));
- params.addElement(new TextParam(0, schemaParam));
- params.addElement(new TextParam(0, procedureNamePattern));
- Vector results = this._messgr.invokeMethod(10, params);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException {
- String catalogParam = "";
- String catalogTerm = this.getCatalogTerm();
- if (catalogTerm != "") {
- catalogParam = catalog;
- }
-
- String schemaParam = "";
- String schemaTerm = this.getSchemaTerm();
- if (schemaTerm != "") {
- schemaParam = schemaPattern;
- }
-
- Vector params = new Vector();
- params.addElement(new TextParam(0, catalogParam));
- params.addElement(new TextParam(0, schemaParam));
- params.addElement(new TextParam(0, procedureNamePattern));
- params.addElement(new TextParam(0, columnNamePattern));
- Vector results = this._messgr.invokeMethod(11, params);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException {
- String catalogParam = "";
- String catalogTerm = this.getCatalogTerm();
- if (catalogTerm != "") {
- catalogParam = catalog;
- }
-
- String schemaParam = "";
- String schemaTerm = this.getSchemaTerm();
- if (schemaTerm != "") {
- schemaParam = schemaPattern;
- }
-
- Vector params = new Vector();
- params.addElement(new TextParam(0, catalogParam));
- params.addElement(new TextParam(0, schemaParam));
- params.addElement(new TextParam(0, tableNamePattern));
- if (types != null) {
- for(int index = 0; index < types.length; ++index) {
- params.addElement(new TextParam(0, types[index]));
- }
- }
-
- Vector results = this._messgr.invokeMethod(12, params);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getSchemas() throws SQLException {
- Vector results = this._messgr.invokeMethod(13);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getCatalogs() throws SQLException {
- Vector results = this._messgr.invokeMethod(14);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getTableTypes() throws SQLException {
- Vector results = this._messgr.invokeMethod(15);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException {
- String catalogParam = "";
- String catalogTerm = this.getCatalogTerm();
- if (catalogTerm != "") {
- catalogParam = catalog;
- }
-
- String schemaParam = "";
- String schemaTerm = this.getSchemaTerm();
- if (schemaTerm != "") {
- schemaParam = schemaPattern;
- }
-
- Vector params = new Vector();
- params.addElement(new TextParam(0, catalogParam));
- params.addElement(new TextParam(0, schemaParam));
- params.addElement(new TextParam(0, tableNamePattern));
- params.addElement(new TextParam(0, columnNamePattern));
- Vector results = this._messgr.invokeMethod(16, params);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException {
- String catalogParam = "";
- String catalogTerm = this.getCatalogTerm();
- if (catalogTerm != "") {
- catalogParam = catalog;
- }
-
- String schemaParam = "";
- String schemaTerm = this.getSchemaTerm();
- if (schemaTerm != "") {
- schemaParam = schema;
- }
-
- Vector params = new Vector();
- params.addElement(new TextParam(0, catalogParam));
- params.addElement(new TextParam(0, schemaParam));
- params.addElement(new TextParam(0, table));
- params.addElement(new TextParam(0, columnNamePattern));
- Vector results = this._messgr.invokeMethod(17, params);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException {
- String catalogParam = "";
- String catalogTerm = this.getCatalogTerm();
- if (catalogTerm != "") {
- catalogParam = catalog;
- }
-
- String schemaParam = "";
- String schemaTerm = this.getSchemaTerm();
- if (schemaTerm != "") {
- schemaParam = schemaPattern;
- }
-
- Vector params = new Vector();
- params.addElement(new TextParam(0, catalogParam));
- params.addElement(new TextParam(0, schemaParam));
- params.addElement(new TextParam(0, tableNamePattern));
- Vector results = this._messgr.invokeMethod(18, params);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException {
- String catalogParam = "";
- String catalogTerm = this.getCatalogTerm();
- if (catalogTerm != "") {
- catalogParam = catalog;
- }
-
- String schemaParam = "";
- String schemaTerm = this.getSchemaTerm();
- if (schemaTerm != "") {
- schemaParam = schema;
- }
-
- Vector params = new Vector();
- params.addElement(new TextParam(0, catalogParam));
- params.addElement(new TextParam(0, schemaParam));
- params.addElement(new TextParam(0, table));
- params.addElement(new Param(0, scope));
- params.addElement(new Param(0, nullable));
- Vector results = this._messgr.invokeMethod(19, params);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getVersionColumns(String catalog, String schema, String table) throws SQLException {
- String catalogParam = "";
- String catalogTerm = this.getCatalogTerm();
- if (catalogTerm != "") {
- catalogParam = catalog;
- }
-
- String schemaParam = "";
- String schemaTerm = this.getSchemaTerm();
- if (schemaTerm != "") {
- schemaParam = schema;
- }
-
- Vector params = new Vector();
- params.addElement(new TextParam(0, catalogParam));
- params.addElement(new TextParam(0, schemaParam));
- params.addElement(new TextParam(0, table));
- Vector results = this._messgr.invokeMethod(20, params);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getPrimaryKeys(String catalog, String schema, String table) throws SQLException {
- String catalogParam = "";
- String catalogTerm = this.getCatalogTerm();
- if (catalogTerm != "") {
- catalogParam = catalog;
- }
-
- String schemaParam = "";
- String schemaTerm = this.getSchemaTerm();
- if (schemaTerm != "") {
- schemaParam = schema;
- }
-
- Vector params = new Vector();
- params.addElement(new TextParam(0, catalogParam));
- params.addElement(new TextParam(0, schemaParam));
- params.addElement(new TextParam(0, table));
- Vector results = this._messgr.invokeMethod(21, params);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getImportedKeys(String catalog, String schema, String table) throws SQLException {
- String catalogParam = "";
- String catalogTerm = this.getCatalogTerm();
- if (catalogTerm != "") {
- catalogParam = catalog;
- }
-
- String schemaParam = "";
- String schemaTerm = this.getSchemaTerm();
- if (schemaTerm != "") {
- schemaParam = schema;
- }
-
- Vector params = new Vector();
- params.addElement(new TextParam(0, catalogParam));
- params.addElement(new TextParam(0, schemaParam));
- params.addElement(new TextParam(0, table));
- Vector results = this._messgr.invokeMethod(22, params);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getExportedKeys(String catalog, String schema, String table) throws SQLException {
- String catalogParam = "";
- String catalogTerm = this.getCatalogTerm();
- if (catalogTerm != "") {
- catalogParam = catalog;
- }
-
- String schemaParam = "";
- String schemaTerm = this.getSchemaTerm();
- if (schemaTerm != "") {
- schemaParam = schema;
- }
-
- Vector params = new Vector();
- params.addElement(new TextParam(0, catalogParam));
- params.addElement(new TextParam(0, schemaParam));
- params.addElement(new TextParam(0, table));
- Vector results = this._messgr.invokeMethod(23, params);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException {
- Vector params = new Vector();
- params.addElement(new TextParam(0, primaryCatalog));
- params.addElement(new TextParam(0, primarySchema));
- params.addElement(new TextParam(0, primaryTable));
- params.addElement(new TextParam(0, foreignCatalog));
- params.addElement(new TextParam(0, foreignSchema));
- params.addElement(new TextParam(0, foreignTable));
- Vector results = this._messgr.invokeMethod(24, params);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getTypeInfo() throws SQLException {
- Vector results = this._messgr.invokeMethod(25);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
-
- public RelationView getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException {
- String catalogParam = "";
- String catalogTerm = this.getCatalogTerm();
- if (catalogTerm != "") {
- catalogParam = catalog;
- }
-
- String schemaParam = "";
- String schemaTerm = this.getSchemaTerm();
- if (schemaTerm != "") {
- schemaParam = schema;
- }
-
- Vector params = new Vector();
- params.addElement(new TextParam(0, catalogParam));
- params.addElement(new TextParam(0, schemaParam));
- params.addElement(new TextParam(0, table));
- params.addElement(new Param(0, unique));
- params.addElement(new Param(0, approximate));
- Vector results = this._messgr.invokeMethod(26, params);
- MultiView mv = new MultiView(this._session, results, this._conn);
- this._multiViews.addElement(mv);
- return mv.getRootRelView();
- }
- }
-